<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model app\modules\Member\models\Member */

$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Members'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="member-view">

   
    <h2 class="page-header"><?= Html::encode($this->title) ?>
        <p class="pull-right"> 
            <?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
            <?= Html::a(Yii::t('app', 'Index'), ['index'], ['class' => 'btn btn-danger']) ?>
        </p>
    </h2>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            //'id',
            'name',
            'phone',
            'mail',
            [
                'attribute' => 'gender',
                'value' => Yii::$app->params['gender'][$model->gender],
            ],
            'password',
            'address',
            //'position',
             [
                'attribute' => 'position',
                'value' => isset(Yii::$app->params['position'][$model->position])? Yii::$app->params['position'][$model->position] : '-',
            ],
            //'group',
             [
                'attribute' => 'group',
                'value' => isset(Yii::$app->params['work_group'][$model->group])?Yii::$app->params['work_group'][$model->group] : '-',
            ],
            'dist_id',
            [
                'attribute' => 'type',
                'value' => Yii::$app->params['memberType'][$model->type],
            ],
            'desc',
            [
                'attribute' => 'status',
                'value' => Yii::$app->params['status'][$model->status],
            ],
            'created_at:datetime',
            'updated_at:relativeTime',
            
        ],
    ]) ?>

</div>
